package com.quectel.core.module.dept.dto;

import com.quectel.core.module.village.dto.VillageDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author caolu
 * @email louis.cao@quectel.com
 * @date 2022/03/24 10:07
 */
@Data
@Schema
public class DeptDto implements Serializable {

    /**
     *
     */
    @Schema(description = "")
    private Long id;

    /**
     * 租户id
     */
    @Schema(description = "租户id")
    private Long tenantId;

    /**
     * 社区id
     */
    @Schema(description = "小区id")
    private Long villageId;

    /**
     * 部门名称
     */
    @Schema(description = "部门名称")
    @NotEmpty
    @Length(min = 1, max = 80)
    private String name;

    /**
     * 部门编码
     */
    @Schema(description = "部门编码")
    @NotEmpty
    @Length(min = 1, max = 50)
    private String code;

    /**
     * 父级id
     */
    @Schema(description = "父级id")
    @NotNull
    private Long parentId;

    /**
     * 层级从1开始 社区代表第0层级
     */
    @Schema(description = "层级从1开始 社区代表第0层级")
    @NotNull
    private Byte level;

    /**
     * 排序
     */
    @Schema(description = "排序")
    @NotNull
    private Integer sort;

    /**
     * 备注
     */
    @Schema(description = "备注")
    @Length(max = 80)
    private String remark;

    /**
     * 创建人
     */
    @Schema(description = "创建人")
    private String creator;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 修改人
     */
    @Schema(description = "修改人")
    private String editor;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private Date editTime;

    /************非数据库字段 start ************/

    private VillageDto villageDto;
    /************非数据库字段 end **************/
}
